package com.gzu.se.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@TableName("orders")
public class Order {
    @TableId
    @JsonFormat(shape = JsonFormat.Shape.STRING) // 序列化为字符串
    private Long id;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long userId;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long buyerId;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long sellerId;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long productId;

    private BigDecimal price;
    private Integer quantity;
    private BigDecimal totalPrice;
    private String status;
    private LocalDateTime createdAt;
    private LocalDateTime finishedAt;
}

